<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="icon" href="">
    <title> arr.Map() && arr.filter()</title>
</head>
<body>
    
</body>
<script>
    var arr = [1,2,3,4,5,6];
    //把 value + 5 存到 新数组 result 中
    var result = arr.map(function(value){ return value+5;});
    console.log(result);

    //filter()过滤筛选符合条件的数组元素
    var result1 = arr.filter(function(value){return value>3;});
    console.log(result1);

    

</script>
</html>